package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);
    int insert(Employee record);
    Employee selectByPrimaryKey(Long id);
    List<Employee> selectAll();
    int updateByPrimaryKey(Employee record);
    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    List<Employee> selectForList(QueryObject qo);
    void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);
    void deleteRelation(Long employeeId);

    void updateByDepartmentId(Long deptId);

    void batchDeleteByIds(Long[] ids);

    Employee selectByUserName(String username);

    List<Employee> querySellersByRoleSn(@Param("market") String market, @Param("marketManger") String marketManger);
}